package top.toptimus.dto.kashiyamaMaterial;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

/**
 * 尖山库存
 *
 * @author gaoyu
 */
@NoArgsConstructor
@Data
public class KashiyamaInventoryDTO {
    private String id;
    private String materialTypeCd;
    private String materialNameCn;
    private String materialCode;
    private String materialQuantity;
    private String materialComposition;
    private String materialSpec;
    private String materialSpecUnitCd;
    private String materialUnitCd;
    private String materialYear;
    private String materialColor;
    private String materialSeason;
    private String materialGramWeight;
    private String materialKnitMethod;
    private String materialSample;
    private String materialSource;
    private String materialThreadCount;
    private String materialStyle;
    private String materialSupplierName;
    private String materialOther3;
    private String materialOther4;
    private String materialOgnizationId;
    private String ognizationName;
    private String brandCn;
    private String materialAlertQuantity;
    private String remarks;

    public KashiyamaInventoryDTO(Map<String, Object> stringObjectMap) {
        this.id = stringObjectMap.containsKey("id") ? stringObjectMap.get("id").toString() : "";
        try {
            this.materialTypeCd = stringObjectMap.containsKey("materialTypeCd") ? stringObjectMap.get("materialTypeCd").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialNameCn = stringObjectMap.containsKey("materialNameCn") ? stringObjectMap.get("materialNameCn").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialCode = stringObjectMap.containsKey("materialCode") ? stringObjectMap.get("materialCode").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialQuantity = stringObjectMap.containsKey("materialQuantity") ? stringObjectMap.get("materialQuantity").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialComposition = stringObjectMap.containsKey("materialComposition") ? stringObjectMap.get("materialComposition").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSpec = stringObjectMap.containsKey("materialSpec") ? stringObjectMap.get("materialSpec").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSpecUnitCd = stringObjectMap.containsKey("materialSpecUnitCd") ? stringObjectMap.get("materialSpecUnitCd").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialUnitCd = stringObjectMap.containsKey("materialUnitCd") ? stringObjectMap.get("materialUnitCd").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialYear = stringObjectMap.containsKey("materialYear") ? stringObjectMap.get("materialYear").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialColor = stringObjectMap.containsKey("materialColor") ? stringObjectMap.get("materialColor").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSeason = stringObjectMap.containsKey("materialSeason") ? stringObjectMap.get("materialSeason").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialGramWeight = stringObjectMap.containsKey("materialGramWeight") ? stringObjectMap.get("materialGramWeight").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialKnitMethod = stringObjectMap.containsKey("materialKnitMethod") ? stringObjectMap.get("materialKnitMethod").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSample = stringObjectMap.containsKey("materialSample") ? stringObjectMap.get("materialSample").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSource = stringObjectMap.containsKey("materialSource") ? stringObjectMap.get("materialSource").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialThreadCount = stringObjectMap.containsKey("materialThreadCount") ? stringObjectMap.get("materialThreadCount").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialStyle = stringObjectMap.containsKey("materialStyle") ? stringObjectMap.get("materialStyle").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialSupplierName = stringObjectMap.containsKey("materialSupplierName") ? stringObjectMap.get("materialSupplierName").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialOther3 = stringObjectMap.containsKey("materialOther3") ? stringObjectMap.get("materialOther3").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialOther4 = stringObjectMap.containsKey("materialOther4") ? stringObjectMap.get("materialOther4").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialOgnizationId = stringObjectMap.containsKey("materialOgnizationId") ? stringObjectMap.get("materialOgnizationId").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.ognizationName = stringObjectMap.containsKey("ognizationName") ? stringObjectMap.get("ognizationName").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.brandCn = stringObjectMap.containsKey("brandCn") ? stringObjectMap.get("brandCn").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.materialAlertQuantity = stringObjectMap.containsKey("materialAlertQuantity") ? stringObjectMap.get("materialAlertQuantity").toString() : "";
        } catch (Exception ignored) {
        }
        try {
            this.remarks = stringObjectMap.containsKey("remarks") ? stringObjectMap.get("remarks").toString() : "";
        } catch (Exception ignored) {
        }
    }
}
